/****** Object:  Stored Procedure dbo.spr_UpdateDBTasksByPK  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_UpdateDBTasksByPK]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_UpdateDBTasksByPK]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_UpdateDBTasksByPK]
 (
	@description varchar(150),
	@taskid varchar(80),
	@taskname varchar(100)
 )

 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	UPDATE [Tasks]
	SET
		[Description] = @description,
		[TaskId] = @taskid,
		[TaskName] = @taskname

	WHERE
	[TaskId] = @taskid


	SET @Err = @@Error
	RETURN @Err
 END

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

